<template>
    <div>
        <a-carousel :after-change="onChange" arrows>
            <div
                    slot="prevArrow"
                    class="custom-slick-arrow"
                    style="left: 10px;zIndex: 1"

            >
                <a-icon type="left-circle" />
            </div>
            <div slot="nextArrow" class="custom-slick-arrow" style="right: 10px">
                <a-icon type="right-circle" />
            </div>
            <div class="swiper-slide" v-for="(item,index) in swiperList" :key='index'>
                <a href="#" :style="{backgroundImage:`url(${item.imgUrlPc})`}"></a>
            </div>
        </a-carousel>
    </div>

</template>
<script>
    export default {
        methods: {
            onChange(a, b, c) {
                console.log(a, b, c);
            },
        },
        data() {
            return {
                dotPosition: 'top',
                swiperList: [],
            };
        },
        props: {
        },
        created() {
            this.$axios
                .get(
                    "http://wkt.myhope365.com//weChat/applet/course/banner/list?number"
                ).then((res) => {
                this.swiperList = res.data.data;


            });
        }
    };
</script>
<style scoped>
    /* For demo */
    .ant-carousel >>> .slick-slide {
        text-align: center;
        height: 400px;
        line-height: 160px;
        background: #364d79;
        overflow: hidden;
    }

    .ant-carousel >>> .custom-slick-arrow {
        width: 25px;
        height: 25px;
        font-size: 25px;
        color: #fff;
        background-color: rgba(31, 45, 61, 0.11);
        opacity: 0.3;
    }
    .ant-carousel >>> .custom-slick-arrow:before {
        display: none;
    }
    .ant-carousel >>> .custom-slick-arrow:hover {
        opacity: 0.5;
    }

    .ant-carousel >>> .slick-slide h3 {
        color: #fff;
    }
    .swiper-slide>a{
        display: block;
        width: 100%;
        height: 400px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }
</style>


